/*
 * @Author: your name
 * @Date: 2021-07-31 07:51:52
 * @LastEditTime: 2021-09-10 18:18:33
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \zuanji-demo\src\router\index.js
 */
import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    // component: () => import('../chart/Track')
    component: Home
  },

  // 注册项目信息
  {
    path: '/register',
    name: 'register',
    component: () => import('@/views/Project')
  },
  {
    path: '/board',
    name: 'Board',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/DisplayBoard.vue'),

    redirect: '/summary',
    children: [
      {
        path: '/summary',
        name: 'Summary',
        // route level code-splitting
        // this generates a separate chunk (about.[hash].js) for this route
        // which is lazy-loaded when the route is visited.
        component: () => import(/* webpackChunkName: "about" */ '../views/Summary.vue')
      },
      {
        path: '/monitor',
        name: 'Monitor',
        // route level code-splitting
        // this generates a separate chunk (about.[hash].js) for this route
        // which is lazy-loaded when the route is visited.
        component: () => import(/* webpackChunkName: "about" */ '../views/MonitorList.vue')
      },
      {
        path: '/statistic',
        name: 'Statistic',
        component: () => import('../components/Statistic.vue')
      },
      {
        path: '/record',
        name: 'Record',
        component: () => import('../views/Record.vue')
      },
      {
        path: '/track',
        name: 'track',
        component: () => import('../views/Geometry')
      }
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
